package com.topscore.uke.network.request;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by 71468 on 2017/11/21.
 */

public class SaveMemberAddressRequest implements Parcelable {
    private String id;
    private String custPhone;
    private String province;
    private String city;
    private String district;
    private String address;
    private String receiverName;
    private String receiverContactInfo;
    private String provinceId;
    private String cityId;
    private String districtId;
    private boolean isCustCreate = false;
    private String createdBy = "uke";
    private boolean isDefault = false;

    public SaveMemberAddressRequest(String custPhone) {
        this.custPhone = custPhone;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCustPhone() {
        return custPhone;
    }

    public void setCustPhone(String custPhone) {
        this.custPhone = custPhone;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getReceiverName() {
        return receiverName;
    }

    public void setReceiverName(String receiverName) {
        this.receiverName = receiverName;
    }

    public String getReceiverContactInfo() {
        return receiverContactInfo;
    }

    public void setReceiverContactInfo(String receiverContactInfo) {
        this.receiverContactInfo = receiverContactInfo;
    }

    public String getProvinceId() {
        return provinceId;
    }

    public void setProvinceId(String provinceId) {
        this.provinceId = provinceId;
    }

    public String getCityId() {
        return cityId;
    }

    public void setCityId(String cityId) {
        this.cityId = cityId;
    }

    public boolean isCustCreate() {
        return isCustCreate;
    }

    public void setCustCreate(boolean custCreate) {
        isCustCreate = custCreate;
    }

    public String getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    public String getDistrict() {
        return district;
    }

    public void setDistrict(String district) {
        this.district = district;
    }

    public String getDistrictId() {
        return districtId;
    }

    public void setDistrictId(String districtId) {
        this.districtId = districtId;
    }

    public boolean getIsDefault() {
        return isDefault;
    }

    public void setIsDefault(boolean isDefault) {
        this.isDefault = isDefault;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.id);
        dest.writeString(this.custPhone);
        dest.writeString(this.province);
        dest.writeString(this.city);
        dest.writeString(this.district);
        dest.writeString(this.address);
        dest.writeString(this.receiverName);
        dest.writeString(this.receiverContactInfo);
        dest.writeString(this.provinceId);
        dest.writeString(this.cityId);
        dest.writeString(this.districtId);
        dest.writeByte(this.isCustCreate ? (byte) 1 : (byte) 0);
        dest.writeString(this.createdBy);
        dest.writeByte(this.isDefault ? (byte) 1 : (byte) 0);
    }

    protected SaveMemberAddressRequest(Parcel in) {
        this.id = in.readString();
        this.custPhone = in.readString();
        this.province = in.readString();
        this.city = in.readString();
        this.district = in.readString();
        this.address = in.readString();
        this.receiverName = in.readString();
        this.receiverContactInfo = in.readString();
        this.provinceId = in.readString();
        this.cityId = in.readString();
        this.districtId = in.readString();
        this.isCustCreate = in.readByte() != 0;
        this.createdBy = in.readString();
        this.isDefault = in.readByte() != 0;
    }

    public static final Creator<SaveMemberAddressRequest> CREATOR = new Creator<SaveMemberAddressRequest>() {
        @Override
        public SaveMemberAddressRequest createFromParcel(Parcel source) {
            return new SaveMemberAddressRequest(source);
        }

        @Override
        public SaveMemberAddressRequest[] newArray(int size) {
            return new SaveMemberAddressRequest[size];
        }
    };
}
